<?
include_once "../../mode/lang/error.php";
include_once "../../mode/message/voteAction.php";
include_once "../../mode/message/vote.php";
include_once "../../mode/table/tbhelper.php";

$db = new db("mysql:host=localhost;dbname=sns","zyn","zyn");
//print_r(tbhelper::produce("dairy"));
$reply = new vote($db,tbhelper::produce("votecommend")); 
$data = array();
$data['con']=1;
$data['uid']=21;
$data['rid']=4;
$replyAction = $reply->getAction(recourse::VOTE);
$replyAction->setData($data);
//print_r($blogLockAction);
try{
	if($replyAction->checkData()){
		echo $replyAction->run();
		echo "OK";
	}
	else{
		echo "CheckDataError";
	}
}
catch(Error $e){
	echo $e->getMessage()."<br /><a href='".$e->getUrl()."'>".$e->getUrlText()."</a>";
}
?>